package routers

import (
	"github.com/gin-gonic/gin"
	"shop-admin/controller"
	"shop-security/preAuthorize"
)

func privateShippingTemplates(router *gin.RouterGroup) {
	templatesController := &controller.ShippingTemplatesController{}
	api := router.Group("/shipping/templates")
	{
		api.GET("/page", preAuthorize.HasPermission("shop:shippingTemplates:page"), templatesController.Page)     //保存
		api.GET("/list", preAuthorize.HasPermission("shop:shippingTemplates:list"), templatesController.List)     //查询所有
		api.GET("/info/:id", preAuthorize.HasPermission("shop:shippingTemplates:info"), templatesController.Info) //保存
		api.POST("", preAuthorize.HasPermission("shop:shippingTemplates:save"), templatesController.Save)         //保存
		api.PUT("", preAuthorize.HasPermission("shop:shippingTemplates:update"), templatesController.Update)      //更新
		api.DELETE("", preAuthorize.HasPermission("shop:shippingTemplates:delete"), templatesController.Delete)   //删除
	}
}
